import request from '@/utils/service'
export default {
    savePhoto(album, access) {
        return request({
            method: "post",
            url: `/user/album/save`,
            data: album,
            headers: {
                Authorization: "token:" + access, //指定消息格式
            },
        })
    },
    getPhotos(access) {
        return request({
            method: "get",
            url: `/user/album/getlist`,
            headers: {
                Authorization: "token:" + access, //指定消息格式
            },
        })
    },
    getPhotosById(id,access) {
        return request({
            method: "get",
            url: `/user/album/${id}`,
            headers: {
                Authorization: "token:" + access, //指定消息格式
            },
        })
    },
    deletePhoto(id, access) {
        return request({
            method: "delete",
            url: `/user/album/delete`,
            params: {
                id
            },
            headers: {
                Authorization: "token:" + access, //指定消息格式
            },
        })
    },
}